package com.qianda.qdminiapp.domain.data;

import com.qianda.qdminiapp.domain.model.order.QqdOrderTowel;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @ClassName OrderTowalData
 * @Author cw
 * @Date 2019/8/29 11:04
 * @Version 1.0
 */
@Data
public class OrderTowalData {

    private Long id;

    /**
     * 订单主表id
     */
    private Long orderId;

    private String orderNo;
    /**
     * 订单用户id
     */
    private Long orderUserId;

    /**
     * 订单设备id
     */
    private Long orderDeviceId;

    private Long companyId;//公司id

    private Long storeId;
    /**
     * 订单金额
     */
    private BigDecimal orderAmt;

    private Integer orderCount;
    /**
     * 订单出巾状态 1:待出巾   3：出巾中   5：出巾完成   7:出巾异常
     */
    private Integer orderStatus;

    /**
     * 订单异常类型: 0：缺巾  3：卷巾处卡巾 5:切巾电机异常 7：切巾处卡巾  9:IC卡模块错误  11:棉巾数量不足
     */
    private Integer orderErrorType;

    /**
     * 订单支付方式: 0:微信   1:余额   2：千豆
     */
    private Integer orderPayType;

    /**
     * 订单支付状态  0:待支付   1:已支付
     */
    private Integer orderPayStatus;

    /**
     * 订单支付时间
     */
    private LocalDateTime orderPayTime;

    /**
     * 毛巾长度
     */
    private Integer orderDeviceLength;

    /**
     * 毛巾类型  0:干毛巾  1:湿纸巾
     */
    private Integer orderTowelType;

    /**
     * 状态 0:正常  1：删除
     */
    private Integer status;

    private String storeName;

    public OrderTowalData(QqdOrderTowel qqdOrderTowel,String storeName) {
        this.id = qqdOrderTowel.getId();
        this.orderId = qqdOrderTowel.getOrderId();
        this.orderNo = qqdOrderTowel.getOrderNo();
        this.orderUserId = qqdOrderTowel.getOrderUserId();
        this.orderDeviceId = qqdOrderTowel.getOrderDeviceId();
        this.companyId = qqdOrderTowel.getCompanyId();
        this.storeId = qqdOrderTowel.getStoreId();
        this.orderAmt = qqdOrderTowel.getOrderAmt();
        this.orderCount = qqdOrderTowel.getOrderCount();
        this.orderStatus = qqdOrderTowel.getOrderStatus();
        this.orderErrorType = qqdOrderTowel.getOrderErrorType();
        this.orderPayType = qqdOrderTowel.getOrderPayType();
        this.orderPayStatus = qqdOrderTowel.getOrderPayStatus();
        this.orderPayTime = qqdOrderTowel.getOrderPayTime();
        this.orderDeviceLength = qqdOrderTowel.getOrderDeviceLength();
        this.orderTowelType = qqdOrderTowel.getOrderTowelType();
        this.status = qqdOrderTowel.getStatus();
        this.storeName = storeName;
    }

    public OrderTowalData() {
    }
}
